home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / db / esm-3.1 / esm-3 / usr / local / sm / src / serverlib / include / undo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-05  |  2.7 KB  |  93 lines

  1. /*
  2.  *   $RCSfile: undo.h,v $  
  3.  *   $Revision: 1.1.1.1 $  
  4.  *   $Date: 1996/05/04 21:55:46 $      
  5.  */ 
  6. #ifndef __UNDO_H__
  7. #define __UNDO_H__
  8.  
  9. /**********************************************************************
  10. * EXODUS Database Toolkit Software
  11. * Copyright (c) 1991 Computer Sciences Department, University of
  12. *                    Wisconsin -- Madison
  13. * All Rights Reserved.
  14. *
  15. * Permission to use, copy, modify and distribute this software and its
  16. * documentation is hereby granted, provided that both the copyright
  17. * notice and this permission notice appear in all copies of the
  18. * software, derivative works or modified versions, and any portions
  19. * thereof, and that both notices appear in supporting documentation.
  20. *
  21. * THE COMPUTER SCIENCES DEPARTMENT OF THE UNIVERSITY OF WISCONSIN --
  22. * MADISON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION.  
  23. * THE DEPARTMENT DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
  24. * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  25. *
  26. * The EXODUS Project Group requests users of this software to return 
  27. * any improvements or extensions that they make to:
  28. *
  29. *   EXODUS Project Group 
  30. *     c/o David J. DeWitt and Michael J. Carey
  31. *   Computer Sciences Department
  32. *   University of Wisconsin -- Madison
  33. *   Madison, WI 53706
  34. *
  35. *     or exodus@cs.wisc.edu
  36. *
  37. * In addition, the EXODUS Project Group requests that users grant the 
  38. * Computer Sciences Department rights to redistribute these changes.
  39. **********************************************************************/
  40. /*
  41.  *    define a record that hold information concerning missing updates
  42.  *    to page pages.
  43.  */
  44. typedef struct _MissingUpdateInfo {
  45.     
  46.     LISTELEMENT    list;        /* list of free/used tables             */
  47.     LIST        *table;        /* pointer to a malloced table            */
  48.     MAGIC        magic;
  49. } MISSINGUPDATEINFO;
  50.  
  51.  
  52. #define MISSINGUPDATEINFO_MAGIC 0x576435ab
  53.  
  54. /*
  55.  *    Define entries in the missing update table
  56.  */
  57. typedef struct {
  58.  
  59.     PID            pid;
  60.     LRC            lrc;
  61.     LRC            firstLRC;    /* first operation not done    */
  62.     LSN            firstLSN;    /* first operation not done    */
  63.     LISTELEMENT    list;
  64.     PAGETYPE    pageType;
  65.  
  66. } MISSINGUPDATE;
  67.  
  68.  
  69. /*
  70.  *  define the magic checking macros
  71.  */
  72. #if MAGIC_CHECKING IS_ENABLED
  73.  
  74.  
  75. #define INIT_MISSINGUPDATEINFO_MAGIC(_missingUpdateInfo)            \
  76.     (_missingUpdateInfo)->magic = MISSINGUPDATEINFO_MAGIC;
  77.  
  78. #define CHECK_MISSINGUPDATEINFO_MAGIC(_missingUpdateInfo)           \
  79.                                                                     \
  80.     if ((_missingUpdateInfo)->magic != MISSINGUPDATEINFO_MAGIC)   { \
  81.                                                                     \
  82.         SM_ERROR(TYPE_FATAL, esmINTERNAL);                          \
  83.     }
  84.  
  85.  
  86. #else
  87.  
  88. #define INIT_MISSINGUPDATEINFO_MAGIC(_missingUpdateInfo)
  89. #define CHECK_MISSINGUPDATEINFO_MAGIC(_missingUpdateInfo)
  90.  
  91. #endif 
  92. #endif __UNDO_H__
  93.